package cn.detu.baking.security;

import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * Date:2024/3/28
 * Author：
 * Description:
 */
@Getter
public class CustomUserDetails extends User {
    private long id;
    private String nickName;
    private String imgUrl;
    private Integer isAdmin;

    public CustomUserDetails(Integer isAdmin,long id, String nickName,String imgUrl, String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);

        this.id = id;
        this.nickName = nickName;
        this.imgUrl = imgUrl;
        this.isAdmin = isAdmin;
    }
}
